package com.example.demo.service;

import com.example.demo.exception.LoginException;
import com.example.demo.exception.ServiceException;

public interface ITokenService {

    /**
     * 新增
     * @param id
     * @return
     */
    String insert(String id)throws ServiceException;

    /**
     * 登录验证
     * @param token
     * @return
     */
    String verification(String token)throws LoginException, ServiceException;

    /**
     * 权限验证
     * @param token
     * @param roleType
     * @return
     * @throws LoginException
     * @throws ServiceException
     */
    String isRoleType(String token, Integer roleType)throws LoginException, ServiceException;
}
